#include "GameOverMenu.h"


GameOverMenu::GameOverMenu()
{ }
	
void GameOverMenu::Load()
{
	m_bg.Load( "game_over_bg" );
	
	// setup the buttons
	m_bg_pos = CIwSVec2( 133, 112 );
	
	m_restart_button.Load( "restart_button", CIwSVec2( m_bg_pos  + CIwSVec2(125, 50) ) );
	m_menu_button.Load( "menu_button", CIwSVec2( m_bg_pos  + CIwSVec2(7, 50) ) );
}

void GameOverMenu::Unload()
{
	m_bg.Unload();
	m_restart_button.Unload();
	m_menu_button.Unload();
}
	
int GameOverMenu::Update( float dt )
{
	(void) dt;
	
	if( m_restart_button.IsPressed() == true ) {
		return 1;
	} 
	
	if( m_menu_button.IsPressed() == true ) {
		return 2;
	}

	return -1;
}

void GameOverMenu::Draw( )
{
	m_bg.Draw( m_bg_pos );
	m_restart_button.Draw( );
	m_menu_button.Draw( );
}